package com.jiaolong.converter;

import com.jiaolong.domain.OrderDo;
import com.jiaolong.dto.OrderDto;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

@Mapper
public interface OrderConverter {

    public OrderConverter INSTANCE = Mappers.getMapper(OrderConverter.class);

    /**
     * dto 转 do
     * @param dto
     * @return
     */
    public OrderDo dto2Do(OrderDto dto);

    /**
     * do 转 dto
     * @param domain
     * @return
     */
    public OrderDto do2Dto(OrderDo domain);
}
